<div class="box">  <!-- Box Head -->
    <div class="box-head">
        <h2 class="left">Current Articles</h2>
        <div class="right">
            <label>search articles</label>

            <input type="text" class="field small-field">
            <input type="submit" value="search" class="button">
        </div>
    </div>
    <!-- End Box Head -->

    <!-- Table -->
    <div class="table">
        <table cellspacing="0" cellpadding="0" border="0" width="100%">
            <tbody>
                <tr>

                    <th width="13"><input type="checkbox" class="checkbox"></th>
                    <th>Title</th>
                    <th>Category</th>
                    <th>Date</th>
                    <th>Added by</th>
                    <th width="110" class="ac">Content &nbsp;Control</th>
                </tr>
                <?php
                   
                    $find = mysql_query("select *, news.id as news_id, c.id as cat_id, c.name as cat_name from `news` join category c on news.category_id = c.id ");
                    if ( mysql_numrows($find) > 0) {

                        while($display = mysql_fetch_assoc($find) ) {
                            
//                         echo "<pre>";
//                          print_r($display);
//                            echo "</pre>";
//                            exit;

                           
                ?>


                <tr class="odd">
                    <td><input type="checkbox" class="checkbox"></td>
                    <td><h3><a href="admin.php?page=news_show&news_id=<?php echo $display['news_id'];?>"><?php echo $display['news_title'];?></a></h3></td>
                    <td><?php echo $display['cat_name'];?></td>
                    <td><?php echo $display['posted_on'];?></td>
                    <td><a href="admin.php?page=admin_detail&admin_id=<?php echo $_SESSION['user_id']; ?>" > <?php echo $display['posted_by'];?></a></td>
                    <td><a class="ico del" href="actions/news_deleter.php?news_id=<?php echo $display['news_id'];?>">Delete</a>
                        &nbsp;&nbsp;&nbsp;&nbsp;<a href="admin.php?page=news_edit&news_id=<?php echo $display['news_id'];?>">Edit</a></td>

                </tr>


                        <?php
                    }
                }
                ?>
            </tbody></table>


        <!-- Pagging -->
        <div class="pagging">
            <div class="left">Showing 1-12 of 44</div>
            <div class="right">
                <a href="#">Previous</a>
                <a href="#">1</a>

                <a href="#">2</a>
                <a href="#">3</a>
                <a href="#">4</a>
                <a href="#">245</a>
                <span>...</span>
                <a href="#">Next</a>

                <a href="#">View all</a>
            </div>
        </div>
        <!-- End Pagging -->

    </div>
    <!-- Table -->
</div>

